/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.springvision.yuanfeng.locale.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.springvision.yuanfeng.locale.entity.DevStation;
import com.springvision.yuanfeng.locale.mapper.DevStationMapper;

/**
 * 设备场站Service
 * @author ycb
 * @version 2018-07-20
 */
@Service
@Transactional(readOnly = true)
public class DevStationService extends CrudService<DevStationMapper, DevStation> {

	public DevStation get(String id) {
		return super.get(id);
	}
	
	public List<DevStation> findList(DevStation devStation) {
		return super.findList(devStation);
	}
	
	public Page<DevStation> findPage(Page<DevStation> page, DevStation devStation) {
		return super.findPage(page, devStation);
	}
	
	@Transactional(readOnly = false)
	public void save(DevStation devStation) {
		super.save(devStation);
	}
	
	@Transactional(readOnly = false)
	public void delete(DevStation devStation) {
		super.delete(devStation);
	}
	
	/**
	 * 离线版获取唯一配置的stationId
	 * 
	 * @return
	 * @author: Elvin Zhao - 279152260@qq.com 
	 * @date: Created on 2018年7月24日 下午6:03:10
	 */
	public DevStation findOneStation() {
		return mapper.findOneStation(new DevStation());
	}
	
	public DevStation getByName(DevStation devStation) {
		return mapper.getByName(devStation);
	}

}